package com.tengju.bff.interfaces.shared.servlet;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

@Getter
@AllArgsConstructor
public enum RiskLevelEnum {

    RISK_LEVEL_ONE(1,"riskLevelOneStrategy","接口结果返回null");


    private int level;

    private String strategy;

    private String desc;


    public static RiskLevelEnum getByLevel(int level) {

        return Arrays.stream(RiskLevelEnum.values())
                .filter(v -> v.level == level)
                .findFirst().orElse(null);

    }


}
